package demo1;

import entity.Student;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: DELL
 * Date: 2023-05-03
 * Time: 11:54
 */
@Controller
public class StudentController2 {

    @Resource(name = "getStudentByName")
    private Student student;

    public void fun() {
        System.out.println("这是 StudentController2 下的 fun 方法");
        System.out.println(student.getName());
    }
}
